#include <iostream>
#include <vector>
#include <list>
using namespace std;

int main() {
    int ia[] = {0, 1, 1, 2, 3, 5, 8, 13, 21, 55, 89};
    int size = sizeof(ia) / sizeof(ia[0]);

    vector<int> vec(ia, ia + size);
    list<int> lst(ia, ia + size);

    for (auto it = lst.begin(); it != lst.end(); ) {
        if (*it % 2 != 0) {
            it = lst.erase(it);
        } else {
            ++it;
        }
    }

    for (auto it = vec.begin(); it != vec.end(); ) {
        if (*it % 2 == 0) {
            it = vec.erase(it);
        } else {
            ++it;
        }
    }

    cout << "List elements after removing odd numbers: ";
    for (const auto& elem : lst) {
        cout << elem << " ";
    }
    cout << endl;

    cout << "Vector elements after removing even numbers: ";
    for (const auto& elem : vec) {
        cout << elem << " ";
    }
    cout << endl;

    return 0;
}
